package com.sxzt.core.result;

import com.sxzt.core.data.BaseResponse;
import com.sxzt.core.data.DefaultResponse;
import com.sxzt.core.enum_status.BaseOut;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class GlobalResponseConcreteBuilder<T> implements GlobalResponseBuilder<T> {

    private BaseOut baseOut;

    private DefaultResponse<T> defaultResponse;

    public GlobalResponseConcreteBuilder(BaseOut baseOut) {
        this.baseOut = baseOut;
        defaultResponse = new DefaultResponse<>();
    }

    @Override
    public BaseResponse<T> getResponse() {
        return defaultResponse;
    }

    @Override
    public GlobalResponseBuilder<T> buildOther() {
        return GlobalResponseBuilder.super.buildOther();
    }
}
